You are here: Building the Logic > Preemption Process Logic
With Preemption Process Logic, ProModel makes it possible to control preemption rather than limit you to default preemption priority levels and values. This feature pertains only to the preemption of entities using a location. It does not include preemption of downtimes.
Normally, if an entity or downtime attempts to preempt an entity that is using a location, the location is immediately preempted (assuming it is preemptable). Once the location finishes the preempting activity, the original preempted entity regains possession of the location and resumes processing where it left off.
To override this default preemption procedure, in the case of entities that are preempted by another entity or a downtime, ProModel allows a Preemption Process Record to be defined which postpones the actual preemption of the location until after the current entity explicitly releases it.
The Preemption Process Record, allows you to control if and when the location is given up. In the case of a preemptive request for a location, the preemption process record allows the entity to be routed elsewhere if desired. If a preemption process is defined, the actual preemption does not occur until the preemption process explicitly frees the location.
After the location is given up, the entity may (1) elect to use an alternative location to complete the process, or (2) seek to regain access to the same location to complete the process.
While an entity is executing a preemption process, it cannot be preempted by any other entity or downtime.
How to create a preemption process record:
1. Using the same entity and location names, create a process record somewhere following the process record where the preemption may occur.
2. Click on the Entity button to display the Entities dialog shown here.
3. Check the Preemption Process option box and click OK.
4. Click on the Operation button to enter the preemption logic. You can use any valid operation logic including delays. It is recommended that you enter a comment as the first line in the logic indicating that this is a preemption process. This will make the record easily identifiable as a preemption process.
Please note
When a preemption occurs, the entity looks forward and then from the beginning of the process list trying to find a preemption process that matches the same entity and location (a process with ALL as the entity name will match any entity). If a match is found, the preemption process gets executed. Otherwise the default preemption occurs. Only the first preemption process encountered will be executed in the event that multiple preemption processes are defined with the same entity and location names.